import React, { Component } from 'react'

// 引入Tabs
import { Tabs } from 'antd';
import { withRouter } from 'react-router-dom';
const { TabPane } = Tabs;

class Manage extends Component {
  render() {
    return (
      <div>
        <Tabs activeKey={this.props.location.pathname}
          onChange={this.callback}>
          <TabPane tab="角色列表" key="/right-manage/roles">
          </TabPane>
          <TabPane tab="权限列表" key="/right-manage/rights">
          </TabPane>
        </Tabs>
         {/* <Route path="/right-manage/roles" component= {Role}/>
        <Route path="/right-manage/rights" component= {Right}/> */}
        {this.props.children}
      </div>
    )
  }
  callback = (key) =>{
    this.props.history.push(key)
  }
}

export default withRouter(Manage)
